package cn.nuaa.cms.util;

import java.util.HashMap;
import java.util.Map;

import com.alibaba.fastjson.JSON;
import com.jfinal.kit.HttpKit;

public class IMUtil {

	public static String getToken(String account) {
		String url = "http://api.cn.ronghub.com/user/getToken.json";
		Map<String,String> data = new HashMap<String, String>();
		data.put("userId", account);
		data.put("name", account);
		data.put("portraitUri","https://ss1.baidu.com/-4o3dSag_xI4khGko9WTAnF6hhy/image/h%3D200/sign=08f4485d56df8db1a32e7b643922dddb/1ad5ad6eddc451dad55f452ebefd5266d116324d.jpg");
		return HttpKit.post(url, JSON.toJSONString(data));
	}
}
